package com.jiantong.work.enums;

/**
 * Created by mz on 16/5/17.
 */
public enum  PrintRelativeInfo {

    PRINT_UNUSED_STATUS(0,"未打印"),
    PRINT_USED_STATUS(1,"已打印"),
    CERT_UNUSED_STATUS(0,"未使用"),
    CERT_USED_STATUS(1,"已使用"),
    HTTP_FAILED_RESULT_STATUS(0,"失败"),
    HTTP_SUCCESS_RESULT_STATUS(1,"成功");


    private final Integer value;
    private final String description;

    PrintRelativeInfo(Integer value, String description) {
        this.value = value;
        this.description = description;
    }
    public static PrintRelativeInfo from(Integer value) {
        for (PrintRelativeInfo printRelativeInfo : PrintRelativeInfo.values()) {
            if (printRelativeInfo.value.equals(value)) {
                return printRelativeInfo;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
